package com.naicheng.ivote.views;

import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.naicheng.ivote.MyApplication;
import com.naicheng.ivote.R;
import com.naicheng.ivote.engin.BaseActivity;

public class MineMainActivity extends BaseActivity {
	
	RelativeLayout rl_myask;
	RelativeLayout rl_myshare;
	RelativeLayout rl_mymsg;
	RelativeLayout rl_myinteg;
	RelativeLayout rl_myset;
	RelativeLayout rl_sysmsg;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_minemain);
		rl_myask = (RelativeLayout) this.findViewById(R.id.rl_myask);
		rl_myshare = (RelativeLayout) this.findViewById(R.id.rl_myshare);
		rl_mymsg = (RelativeLayout) this.findViewById(R.id.rl_mymsg);
		rl_myinteg = (RelativeLayout) this.findViewById(R.id.rl_myinteg);
		rl_myset = (RelativeLayout) this.findViewById(R.id.rl_myset);
		rl_sysmsg = (RelativeLayout) this.findViewById(R.id.rl_sysmsg);
		
		
		
		rl_myask.setOnClickListener(this);
		rl_myshare.setOnClickListener(this);
		rl_mymsg.setOnClickListener(this);
		rl_myinteg.setOnClickListener(this);
		rl_myset.setOnClickListener(this);
		rl_sysmsg.setOnClickListener(this);
	}
	
	@Override
	public void onClick(View v) {
		//TextUtils.isEmpty(MyApplication.user.userid)
		if(false){
			startActivity(new Intent(MineMainActivity.this, LoginActivity.class));
		}else{
			switch (v.getId()) {
			case R.id.rl_myask:
				startActivity(new Intent(MineMainActivity.this, MineAskActivity.class));
				break;
			case R.id.rl_myshare:
				startActivity(new Intent(MineMainActivity.this, MyShareActivity.class));
				break;
			case R.id.rl_mymsg:
				startActivity(new Intent(MineMainActivity.this, MyMessageActivity.class));
				break;
			case R.id.rl_myinteg:
				startActivity(new Intent(MineMainActivity.this, MyIntegActivity.class));
				break;
			case R.id.rl_myset:
				startActivity(new Intent(MineMainActivity.this, MySetActivity.class));
				break;
			case R.id.rl_sysmsg:
				startActivity(new Intent(MineMainActivity.this, MySysMessageActivity.class));
				break;
			default:
				break;
			}
			
		}
		super.onClick(v);
	}

}
